classdef ProcessXMLCON < handle
  % Base class for processing SBE XMLCON files
  % Derived from handle
  % Constructor signature: xmlcon = ProcessXMLCON(wFO), arg optional,
  %                                 wFO = fileWrapper object
  %
  % Author: David Goldsmith, Wash. State Dept. of Ecology, dgol461@ecy.wa.gov
  % Release date: N/A
    
    properties
        wFO = {};
        err = '';
        data;
        Sensors;
    end
    
    methods
        
        function xmlcon = ProcessXMLCON(wFO) % Constructor
            if isempty(wFO)
                xmlcon.err = 'Empty';
            elseif ~isa(wFO, 'fileWrapper')
                xmlcon.err = 'Wrong input type';
            else
                xmlcon.wFO = wFO;
            end
            if isempty(xmlcon.err)
                xmlcon.parseXMLCON;
            end
        end
        
        function parseXMLCON(obj)
            obj.data = myReadXMLFile(obj.wFO.name);
        end
        
    end
    
    methods(Abstract)
        unpackXMLCON(obj);
    end
    
end